<?php

namespace app\api\controller;

use app\admin\model\Company;
use app\common\controller\Api;
use think\response\Json;
use function fast\e;

/**
 * 首页接口
 */
class Index extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    /**
     * 首页
     *
     */
    public function index()
    {
        $this->success('请求成功');
    }


   /**
    * @note 公司简介
    * @return Json
    * @author 朱乐斌
    * @date 2023/9/14 17:34
    */
    public function company()
    {
        $id = input('id/d');
        if (!empty($id)){
            $model = new Company();
            $date = $model->find($id);
            return json([
                'code' => 200,
                'msg' => '请求成功',
                'date' => $date
            ]);
        }else{
            return json([
                'code' => 402,
                'msg' => '请求失败',
                'date' => []
            ]);
        }
    }



}
